package top.humbleyuan.designmode.subpub;

/**
 * @Author HumbleYuan
 * @Date 2019/12/18 20:12
 * @Des 具体发布者
 */
public class PublisherImpl<T> implements IPublisher<T> {

    private String name;

    public PublisherImpl(String name) {
        super();
        this.name = name;
    }

    @Override
    public void publish(SubPubPlatform plat, T msg, boolean isInstantMsg) {
        plat.publish(this.name, msg, isInstantMsg);
    }
}
